import { tgxModuleContext, tgxUIController } from "../../core_tgx/tgx";
import { GameUILayers } from "../../scripts/GameUILayers";
import { ModuleDef } from "../../scripts/ModuleDef";
import { Layout_SearchingRival } from "./Layout_SearchingRival";

export class UI_SearchingRival extends tgxUIController {

    constructor() {
        super('ui_searching_rival/ui_searching_rival', GameUILayers.POPUP, Layout_SearchingRival);
    }

    protected onCreated(): void {
        let layout = this.layout as Layout_SearchingRival;
        this.onButtonEvent(layout.btnCancel, () => {
            //BilliardsGameMgr.inst.sendMsg_SearchRivalCancel();
            this.hide();
        });
    }

    protected onDispose(): void {

    }
}

tgxModuleContext.attachModule(UI_SearchingRival, ModuleDef.BASIC);